<!DOCTYPE html>

<%@ page pageEncoding="UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@page import="javax.servlet.http.HttpServletRequest"%>
<%!
   public String getServerAddress(HttpServletRequest req){
        StringBuffer url = new StringBuffer ();
		String scheme = req.getScheme ();
		int port = req.getServerPort ();
	
		url.append (scheme);		// http, https
		url.append ("://");
		url.append (req.getServerName ());
		/*if ((scheme.equals ("http") && port != 80)
			|| (scheme.equals ("https") && port != 443)) {
		    url.append (':');
		    url.append (req.getServerPort ());
		}*/
	
		return new String(url);
   }
%>

<%
     String address = getServerAddress(request);
     String logoutAddress = address + "/cas/logout";
    
%>
<html lang="en">
<head>
  <meta charset="UTF-8" />
   <title>Qloudgen Demo &#8211; Authentication & Authorization </title>
  <link rel="stylesheet" href="../css/demo.css" />
</head>
<body id="demo">
   <div id="header">
	  <div id="nav-system">
	    <ul>
	    	<li><a href="<%= logoutAddress%>" title="logout of current session">logout</a></li>
	    </ul>
	  </div>
	  <p id="tagline">Qloudgen</p>
	  <h1 id="app-name">Authentication & Authorization</h1>
  </div>
  <div id="nav-main">
	  <ul>
	  	<li><a id="accountTransfer" href="transfer.jsp"><span>Account Transfer</span></a></li>
	  </ul>
  </div>
  <div id="container">
      <div id="content">
